package com.example.hello.client.TabPane;

import com.vaadin.shared.AbstractComponentState;
import com.vaadin.shared.Connector;

import java.util.LinkedList;
import java.util.List;

public class BootstrapTabPaneState extends AbstractComponentState {

    private List<Connector> widgets = new LinkedList<Connector>();

    private boolean active;
    private boolean createTabLink;
    private String heading;
    private String href = "default";

    public List<Connector> getWidgets() {
        return widgets;
    }

    public void setWidgets(List<Connector> widgets) {
        this.widgets = widgets;
    }

    public void addWidget(Connector widget) {
        widgets.add(widget);
    }

    public void addWidget(Connector widget, int index) {
        widgets.add(index, widget);
    }

    public boolean removeWidget(Connector widget) {
        return widgets.remove(widget);
    }

    public boolean isActive() {
        return active;
    }

    public void setActive(boolean active) {
        this.active = active;
    }

    public boolean isCreateTabLink() {
        return createTabLink;
    }

    public void setCreateTabLink(boolean createTabLink) {
        this.createTabLink = createTabLink;
    }

    public String getHeading() {
        return heading;
    }

    public void setHeading(String heading) {
        this.heading = heading;
    }

    public String getHref() {
        return href;
    }

    public void setHref(String href) {
        this.href = href;
    }

}
